$( document ).ready( function() {
  $( ".autofocus" ).focus()
  $( "#member_search_advanced_link a" ).click( function() {
    $( "#member_search_advanced_link a" ).hide()
    $( "#member_search_advanced" ).show()
    $( "#institution" ).focus()
    return false
  })
  $('.other-article-versions').hide();
  $('.hide-version-links').hide();
  $('.show-version-links').click( function() {
    $('#article-version-' + this.id.split('-')[2]).show()
    $('#hide-documents-' + this.id.split('-')[2]).show()
    $(this).hide()
    return false
  })
  $('.hide-version-links').click( function() {
    $('#article-version-' + this.id.split('-')[2]).hide()
    $('#show-documents-' + this.id.split('-')[2]).show()
    $(this).hide()
    return false
  })
})
